package com.bks.service;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/test")
@Produces(MediaType.APPLICATION_JSON)
public class Test {

	@Inject
	private EntityManager em;

	@GET
	public Object testee(){
		Query query = this.em.createNamedQuery("Author.findAll");
		return query.getResultList();
	}

}
